﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplication1.Servidor1;

namespace WebApplication1
{
	public partial class CrearBodega : System.Web.UI.Page
	{
        Service1 servidor;

		protected void Page_Load(object sender, EventArgs e)
		{
            if (Session["NombreUsuario"] == null)
                Response.Redirect("Login.aspx");
            servidor = (Service1)Session["Server"];
		}

        protected void Button1_Click(object sender, EventArgs e)
        {
            if ((TextBox1.Text != "") && (TextBox2.Text != ""))
            {
                String Empresa = Session["NombreEmpresaUsuario"].ToString();
                servidor.Crear_Bodega(TextBox1.Text, TextBox2.Text, Empresa);
            }
        }
	}
}